import os
import sys
import logging
import logging.handlers
from PyQt5 import QtCore
from PyQt5.QtWidgets import QApplication, QStyleFactory
from Units import  QRouter
from packages import pageLoginRegister

dirname = os.path.dirname('E:/Users/刘海明/AppData/Local/Programs/Python/Python38/')
plugin_path = os.path.join(dirname, 'Lib', 'site-packages', 'PyQt5', 'Qt5', 'plugins', 'platforms')
os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = plugin_path

logging.basicConfig(format="%(asctime)s %(filename)s(line:%(lineno)d) [%(levelname)s] : %(message)s", datefmt="%Y-%M-%d %H:%M:%S", level=logging.DEBUG)

if __name__ == '__main__':
    application = QApplication(sys.argv)
    application.setStyle(QStyleFactory.create("Fusion"))
    window = QRouter(pageLoginRegister.LoginRegisterLogic, ())
    sys.exit(application.exec_())